#include "Daze.h"

Daze::Daze(const City &city, const Trajectory &trajectory) :
_city(city), _trajectory(trajectory)
{
}

Real Daze::at(const Real &t) const
{
	Real daze;
	for (std::vector< Vector >::const_iterator it = this->_city.begin(); it != this->_city.end(); ++it)
	{
		daze += (this->_trajectory(t) - *it).norm2();
	}

	return daze;
}
